//
//  FooterView.m
//  LubanWork
//
//  Created by xiaotong on 2020/1/2.
//  Copyright © 2020 xiaohao. All rights reserved.
//

#import "FooterView.h"

@implementation FooterView

-(instancetype)init{
    self = [super init];
    if (self) {
        [self addSubview:self.FavoriteBtn];
        [self addSubview:self.SignBtn];
        [self.FavoriteBtn mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.left.height.equalTo(self);
            make.width.mas_offset(WIDTH/2);
        }];
        
        [self.SignBtn mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.top.height.equalTo(self);
            make.width.mas_offset(WIDTH/2);
        }];
        
        
        self.backgroundColor = [UIColor colorWithRed:255/255.0 green:255/255.0 blue:255/255.0 alpha:1.0];
        self.layer.shadowColor = [UIColor colorWithRed:1/255.0 green:6/255.0 blue:29/255.0 alpha:0.1].CGColor;
        self.layer.shadowOffset = CGSizeMake(0,0);
        self.layer.shadowOpacity = 1;
        self.layer.shadowRadius = 5;
    }
    return self;
}

-(UIButton *)FavoriteBtn{
    if (!_FavoriteBtn) {
        _FavoriteBtn = [UIButton CreatButtontext:@"点击收藏" image:[UIImage imageNamed:@"score"] Font:kFONT(17) Textcolor:kColorFromRGBHex(0x333333)];
        [_FavoriteBtn setBackgroundColor:ColorWhite];
        [_FavoriteBtn setImage:[UIImage imageNamed:@"收藏选中"] forState:UIControlStateSelected];
        [_FavoriteBtn setTitle:@"已收藏" forState:UIControlStateSelected];
        [_FavoriteBtn setTitleColor:kColorFromRGBHex(0xFF0F47) forState:UIControlStateSelected];
        [_FavoriteBtn layoutWithEdgeInsetsStyle:ButtonEdgeInsetsStyle_Left imageTitleSpace:kSCRATIO(10)];
        
    }
    return _FavoriteBtn;
}

-(UIButton *)SignBtn{
    if (!_SignBtn) {
        _SignBtn = [UIButton CreatButtontext:@"立即报名" image:nil Font:kFONT(17) Textcolor:ColorWhite];
        [_SignBtn setTitle:@"已报名" forState:UIControlStateSelected];
        [_SignBtn setTitleColor:ColorWhite forState:UIControlStateSelected];
        [_SignBtn setBackgroundColor:kColorFromRGBHex(0x775FFB)];
        
    }
    return _SignBtn;
}





@end
